﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MTC.Common;
using MTC.Web.Business;

namespace MTC.Web
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                
            }

        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            MTC.Web.Business.Session session = new Session();
         
            if (txtUser.Text.ToLower() == "maria" && txtPassword.Text.ToLower() == "taxi!")
            {
                session.User = txtUser.Text;
                session.Password = txtPassword.Text;
                Session[Globals.SESSION_FIELDS] = session;
                Response.Redirect(Globals.DriverListScreen);
            }
           
        }

        protected void btnCancel_Click(object sender, EventArgs e)
        {
            txtUser.Text = "";
            txtPassword.Text = "";
        }
    }
}
